Skip to content

feat: logical equivalence for modal logic#535

Merged
fmontesi merged 26 commits into
mainfrom
modal-equiv
Jun 11, 2026
Merged

feat: logical equivalence for modal logic#535
fmontesi merged 26 commits into
mainfrom
modal-equiv

Conversation

@fmontesi

@fmontesi fmontesi commented May 2, 2026

Copy link
Copy Markdown
Collaborator

Adds logical equivalence for modal logic, proving that it is a Congruence (for any modal logic, regardless of the class of models considered) and a LogicalEquivalence (for logic K, i.e., when considering the class of all models).

The PR also renames Proposition.neg to Proposition.not and adds a useful lemma on Proposition.iff.

Depends on #528.

@fmontesi fmontesi requested a review from chenson2018 as a code owner May 2, 2026 12:43
@fmontesi fmontesi added the logic label May 2, 2026

@thomaskwaring thomaskwaring left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some minor comments but lgtm on the whole!

Comment thread Cslib/Logics/Modal/Basic.lean
Comment thread Cslib/Logics/Modal/LogicalEquivalence.lean
Comment thread Cslib/Logics/Modal/LogicalEquivalence.lean
@fmontesi

Copy link
Copy Markdown
Collaborator Author

Thanks, @thomaskwaring. All done!

@fmontesi fmontesi enabled auto-merge May 31, 2026 11:49
Comment thread Cslib/Logics/Modal/Basic.lean Outdated
Comment thread Cslib/Logics/Modal/LogicalEquivalence.lean Outdated
Comment thread Cslib/Logics/Modal/LogicalEquivalence.lean Outdated
Comment thread Cslib/Logics/Modal/LogicalEquivalence.lean Outdated
Comment thread Cslib/Logics/Modal/LogicalEquivalence.lean Outdated
Comment thread Cslib/Logics/Modal/LogicalEquivalence.lean Outdated
Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
@fmontesi fmontesi requested a review from arademaker as a code owner June 10, 2026 16:43
fmontesi and others added 3 commits June 10, 2026 18:43
Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
@fmontesi fmontesi requested a review from chenson2018 June 10, 2026 16:48

@chenson2018 chenson2018 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two comments below about notation lemmas that need to be extracted, but I'm going to go ahead and approve so you're not waiting on me.

Comment thread Cslib/Logics/Modal/LogicalEquivalence.lean Outdated
Comment thread Cslib/Logics/Modal/LogicalEquivalence.lean Outdated
@fmontesi

Copy link
Copy Markdown
Collaborator Author

@chenson2018 I've extracted the lemmas, but I do wonder about the direction we state these _def lemmas. To make it work, I had to use the =_ grind annotation. Is that the expected way to do this?

@fmontesi fmontesi disabled auto-merge June 11, 2026 07:53
@fmontesi fmontesi enabled auto-merge June 11, 2026 07:53
@fmontesi fmontesi disabled auto-merge June 11, 2026 08:19
@fmontesi fmontesi added this pull request to the merge queue Jun 11, 2026
Merged via the queue into main with commit e3991ff Jun 11, 2026
2 checks passed
benbrastmckie pushed a commit to benbrastmckie/cslib that referenced this pull request Jun 12, 2026
Adds logical equivalence for modal logic, proving that it is a
`Congruence` (for any modal logic, regardless of the class of models
considered) and a `LogicalEquivalence` (for logic K, i.e., when
considering the class of all models).

The PR also renames `Proposition.neg` to `Proposition.not` and adds a
useful lemma on `Proposition.iff`.

Depends on leanprover#528.

---------

Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
benbrastmckie added a commit to benbrastmckie/cslib that referenced this pull request Jun 15, 2026
Diplomatic PR description for Modal/ formula primitives refactoring,
stacking on PR leanprover#648. Coordinates with PRs leanprover#607, leanprover#528, leanprover#535, leanprover#649.

Session: sess_1781535860_c7d8e9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants